package com.aistar.servlet.member;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class RegistServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //1. 接收页面参数(手机号，密码，是否同意协议)
        String telnoStr = request.getParameter("telno");
        String passwordStr = request.getParameter("password");
        String isAgreeStr = request.getParameter("isAgree");

        long telno = Long.valueOf(telnoStr);
        System.out.println("telnoStr：" + telnoStr);
        System.out.println("passwordStr：" + passwordStr);
        System.out.println("isAgreeStr：" + isAgreeStr);

        //2. 封装成Memer对象
        // 3. 调用service层
        //4. 返回的结果，给出响应页面与数据
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
       this.doGet(req,resp);
    }
}
